<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        // cookie 在同一路径下，名称具有唯一性，后面覆盖前面
        // 多条数据  也只能一条一条的存储

        document.cookie = 'username=cc;path=/;expires=' + new Date();    // 8小时之后到期
        document.cookie = 'pwd=123;path=/;expires=' + new Date();
        document.cookie = 'phone=1888888888888;path=/;expires=' + new Date();

        document.cookie = 'username=qq;path=/;expires=' + new Date();

    </script>

</body>

</html>